#!usr/bin/env python
# -*- coding:utf-8 _*-
"""
# author: 小菠萝测试笔记
# blog:  https://www.cnblogs.com/poloyy/
# time: 2021/10/15 9:07 上午
# file: user.py
"""
from sqlalchemy import Boolean, Column, DateTime, Integer, String

from app.db.base_class import Base


class User(Base):
    user_id = Column(String(64), nullable=False, comment="用户id")
    name = Column(String(255), nullable=False, comment="用户姓名")
    username = Column(String(255), nullable=False, comment="用户名")
    password = Column(String(255), nullable=False, comment="密码")
    email = Column(String(255), nullable=False, comment="邮箱")
    phone = Column(String(255), nullable=False, comment="手机")
    avatar = Column(String(255), comment="头像")
    ip = Column(String(255), comment="IP地址")
    state = Column(Integer, default=1, comment="状态,1表示启用,0表示停用")
    is_super = Column(Boolean, default=False, comment="是否为超管")
    last_login_time = Column(DateTime, comment="上次登录时间")
